/*
 * @Autor: dc
 * @Date: 2022-03-31 09:19:58
 * @LastEditors: dc
 * @LastEditTime: 2022-03-31 15:00:21
 * @Description: 操作台组件
 */

import React, { Component } from 'react'
import './index.scss'
import store from '../../redux/store'
import { createIncrementAction } from '../../redux/action/tree'

export default class index extends Component {

  render() {
    const { operationFun } = this.props
    const { operationArr } = store.getState();
    return (
      <div className='operation_ul flex_around flex_items'>
        {
          operationArr.map(item => {
            return (
              <div onClick={() => operationFun(item.name)}
                className={`operation_li pos_r ${item.prepare === 0 ? 'prepare' : ''}`} key={item.id}>
                {item.prepare >0 ? <span className="time flex_center" >{item.prepare}</span> : ''}

                <img className={`li_icon`} src={item.icon} alt="" />
              </div>
            )
          })
        }
      </div>
    )
  }
}
